
// 获取授权链接
import request from "@/utils/request";

export function getAuthorizationLink(appid) {
  return request({
    url: '/wechat/getAuthorizationLink/'+appid,
    method: 'get'
  })
}

export function gettemplatedraftlist() {
  return request({
    url: '/wechat/gettemplatedraftlist',
    method: 'get'
  })
}

export function gettemplatelist() {
  return request({
    url: '/wechat/gettemplatelist',
    method: 'get'
  })
}

export function deletetemplate(template_id) {
  return request({
    url: '/wechat/deletetemplate/'+template_id,
    method: 'get'
  })
}


export function addtotemplate(draft_id, template_type) {
  const data = {
    draft_id,
    template_type
  }
  return request({
    url: '/wechat/addtotemplate',
    method: 'post',
    data: data
  })
}


// 新增公告
export function templateUpload(data) {
  return request({
    url: '/wechat/templateUpload',
    method: 'post',
    data: data
  })
}



